import OrderTypeCons from '@/type/OrderTypeCons'
/**
 * author : xuzongmeng
 * date   : 2019/11/15.
 * desc   : 定义各种下拉筛选框常量数组
 */
// export default class OptionsCons {
//   orderStatusOptions = [{value: -1, label: '全部'}, {value: 0, label: '已创建'},
//      {value: 1, label: '已支付'}, {value: 2, label: '已退款'},
//     {value: 3, label: '已关闭'}, {value: 4, label: '已确认'},
//     {value: 5, label: '完成'}]
// }
// export const reasonOptions =
//   [{value: '1', label: '支付保证金'},
//   {value: '2', label: '用户报价扣除积分'}]
export default class OptionsCons {
  static orderStatusOptions () {
    return [{value: OrderTypeCons.All, label: '全部'},
      {value: OrderTypeCons.Create, label: '已创建'},
      {value: OrderTypeCons.Pay, label: '已支付'},
      {value: OrderTypeCons.Refund, label: '已退款'},
      {value: OrderTypeCons.Close, label: '已关闭'},
      {value: OrderTypeCons.Confirm, label: '已确认'},
      {value: OrderTypeCons.End, label: '完成'}]
  }
  static hotelLevelOptions () {
    return [{value: -1, label: '全部'},
      {value: 1, label: '一星级'},
      {value: 2, label: '二星级'},
      {value: 3, label: '三星级'},
      {value: 4, label: '四星级'},
      {value: 5, label: '五星级'}
    ]
  }
  static dateTimeRangeOptions () {
    return {
      shortcuts: [{
        text: '最近一周',
        onClick (picker) {
          const end = new Date()
          const start = new Date()
          start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
          picker.$emit('pick', [start, end])
        }
      }, {
        text: '最近一个月',
        onClick (picker) {
          const end = new Date()
          const start = new Date()
          start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
          picker.$emit('pick', [start, end])
        }
      }, {
        text: '最近三个月',
        onClick (picker) {
          const end = new Date()
          const start = new Date()
          start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
          picker.$emit('pick', [start, end])
        }
      }]
    }
  }
}
